-
Notifications
You must be signed in to change notification settings - Fork 76
Page layout for API docs #685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@zahidalidev is attempting to deploy a commit to the Sourcegraph Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| export function Layout({ children }: { children: React.ReactNode }) { | ||
| let pathname = usePathname(); | ||
| let isHomePage = pathname === '/'; | ||
| let isCodyApiPage = pathname === '/cody-api'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The OpenAPI spec is for "Sourcegraph API" and I think it's best that we update the page https://sourcegraph.com/docs/api to be the home for these docs. I will update the OpenAPI spec to include the contents from the current https://sourcegraph.com/docs/api/stream_api https://sourcegraph.com/docs/api/graphql pages
The end goal is that these API docs will cover all of our APIs, not just Cody.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After more thinking, it's probably best to call this the "OpenAPI explorer" for "Sourcegraph APIs". We can treat this as a sibling page to the graphql and streaming search. The OpenAPI explorer will also document streaming search + graphql, but it's OK if there's some duplicate information. We can't remove the custom streaming search page or graphql page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exciting! I'm very much looking forward to seeing these docs go live :D
The select menu needs customization for dark theme
CleanShot.2024-10-09.at.15.45.30.mp4
We should enable text wrapping for the authorization component
(low-priority) The total number of languages here is a bit overwhelming, we may want to reduce the number of options if possible

|
minor: the "export" option downloads a file named "document.yaml", it would be nice if it used the same name as the original spec file. |
|
Closing temporarily. |


Pull Request approval
Although pull request approval is not enforced for this repository in order to reduce friction, merging without a review will generate a ticket for the docs team to review your changes. So if possible, have your pull request approved before merging.